<?php
/******************************************************************************************
 * The contents of this file are subject to the SOURCE CODE AGREEMENT ("License Agreement")
 * which can be viewed at http://www.letrium.com/jetmobile-agreement
 *
 * BY DOWNLOADING AND/OR INSTALLING AND/OR USING THIS FILE YOU AGREE TO BE BOUND BY THE TERMS
 * OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT,
 * PLEASE DO NOT DOWNLOAD, INSTALL, RUN, OR OTHERWISE USE THE SOURCES OF THE SOFTWARE.
 * Under the terms of the license, You shall not, among other things:
 * 1) permit, authorize, license or sublicense any third party to view or use
 * the Source Code; 2) sell, rent, lease, distribute, make available, publish or
 * otherwise transfer the Source Code; 3) develop Forked Software;
 * 4) use the Source Code for anything other than its intended, legitimate,
 * and legal purpose.
 *
 * You do not have the right to remove Letrium copyrights from the source code
 * or user interface.
 *
 * To the maximum extent permitted by applicable law, Letrium shall not be liable
 * to Licensee for any incidental, consequential, special, punitive or
 * indirect damages, including without limitation, damages for loss of profits,
 * business opportunity, data or use, incurred by Licensee or any third party,
 * even if it has been advised of the possibility of such damages.
 * Letrium makes no representations or warranties with respect to the Source Code.
 * All express or implied representations and warranties, including without
 * limitation any implied warranty of merchantability, of fitness for a particular
 * purpose, of reliability or availability, of accuracy or completeness of responses,
 * of results, of workmanlike effort, of lack of viruses, and of lack of negligence,
 * is hereby expressly disclaimed. Licensee specifically acknowledges that the Source Code
 * is provided "as is" and may have bugs, errors, defects or deficiencies.
 *
 * Copyright (C) 2012 Letrium ltd.; All Rights Reserved.
 ******************************************************************************************/
if(!defined('sugarEntry'))define('sugarEntry', true);


require_once('service/v4/registry.php');

class registry_jetMobile extends registry_v4 {


	/**
	 * registerFunction
         *
         * Registers all the functions on the service class
	 *
	 */
	protected function registerFunction()
	{
        $this->serviceClass->registerFunction(
            'getRelatedCount',
            array(
		        'session' => 'xsd:string',
		        'moduleName' => 'xsd:string',
		        'moduleId' => 'xsd:string',		        
		        'linkFieldName' => 'xsd:string',
		    ),
		    array('return'=>'xsd:int')
		);
		
        $this->serviceClass->registerFunction(
            'getRelatedEntries',
            array(
		        'session' => 'xsd:string',
		        'moduleName' => 'xsd:string',
		        'moduleId' => 'xsd:string',		        
		        'linkFieldName' => 'xsd:string',
		        'orderBy' => 'xsd:string',
		        'offset' => 'xsd:int',
		        'limit' => 'xsd:int',
		    ),
		    array('return'=>'tns:get_entry_list_result_version_jetMobile')	
		);
		
        $this->serviceClass->registerFunction(
            'getMobileQS',
            array(
		        'session' => 'xsd:string',
		        'query' => 'xsd:string',
		    ),
		    array('return'=>'xsd:string')
		);
	}


    /**
   	 * This method registers all the complex types
   	 *
   	 */
   	protected function registerTypes()
   	{
		parent::registerTypes();
		
		$this->serviceClass->registerType(
		   	 'get_entry_list_result_jetMobile',
		   	 'complexType',
		   	 'struct',
		   	 'all',
		  	  '',
			array(
				'result_count'      => array('name'=>'result_count', 'type'=>'xsd:int'),
				'next_offset'       => array('name'=>'next_offset', 'type'=>'xsd:int'),
				'entry_list'        => array('name' =>'entry_list', 'type'=>'tns:entry_list'),
				'relationship_list' => array('name' =>'relationship_list', 'type'=>'tns:link_lists'),
				'parentName'        => array('name'=>'parentName', 'type'=>'xsd:string'),
			)
		);
	}

}
